class Solution
{
public:
    int maxValue(const vector<int> &nums)
    {
        // write your code there
        //...
    }
};